#ifndef COMPRESOR_H_
#define COMPRESOR_H_
#include <iostream>
#include <fstream>
#include "Bitmap.h"
#include "QuadTreeHojasComp.h"
#include "QuadTreeVector.h"

using namespace std;
class Compresor {
private:

	bool fueraRango(long, long, long, long);
	void media(long, long, long, Bitmap *,long&,long&,long&);
	void desviacionstd(long, long, long, Bitmap *,double&,double&,double&);
	bool homogenea(long, long, long, long, Bitmap *, long);
	void cargar(long, long, long, long, long, long, Bitmap *, QuadTree *&, long);
	bool esCuadrada(int, int);
	bool potenciaDos(int);
	int potCercana(int, int);
	void completar(Bitmap *&, int, int);
	void pintar(int, int, int, int, long, Bitmap * &, long, long);
	void descomprimir(QuadTree *, long, long, long, long, Bitmap *&, long, long);
	void reconstruir(QuadTree * &, Bitmap * &, long, long, long, long,const char *);
	void guardar(QuadTree *, int, int, int,const char *);
	void recuperar(QuadTree *&, long&, long&, long&, const char *);
public:
	Compresor();
	~Compresor();
	void Comprimir(int,const char *,const char *, int);
	void Descomprimir(const char *,const char *);
};

#endif /* COMPRESOR_H_ */
